
import 'package:flutter/material.dart';
import 'package:flutter_uxin/Home/homeRoot.dart';
import 'package:flutter_uxin/HomeWork/HomeWorkTeacherRoot.dart';
import 'package:flutter_uxin/Message/MessageRoot.dart';
import 'package:flutter_uxin/My/myRoot.dart';








class baseTab extends StatelessWidget {
  baseTab({Key key, this.title}) : super(key: key);
  final String title;

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 4,
      child: Scaffold(
        body: TabBarView(
          physics: NeverScrollableScrollPhysics(),
          children: [
            HomeRootPage(title:'优教信使'),
            HomeWorkTeacherRootPage(title:'作业'),
            MessageRootPage(title:'消息'),
            MyRootPage(title:'我'),
          ],
        ),
        bottomNavigationBar: TabBar(
          tabs: [
            Tab(icon: Icon(Icons.home),text: "首页",),
            Tab(icon: ImageIcon(AssetImage('RootResource/images/nav_hdxx_normal.png')),text: "作业",),
            Tab(icon: ImageIcon(AssetImage('RootResource/images/nav_zy_normal.png')),text: "消息",),
            Tab(icon: Icon(Icons.perm_identity),text: "我",)
          ],
          unselectedLabelColor: Colors.blueGrey,
          labelColor: Colors.blue,
          indicatorSize: TabBarIndicatorSize.label,
          indicatorColor: Colors.red,
        ),
      ),
    );
  }
}